package org.sems.sems.Controller;

import org.sems.sems.entity.Xxdmk;
import org.sems.sems.service.XxdmkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/xxdmk")
public class XxdmkController {
    @Autowired
    private XxdmkService xxdmkService;
    // 获取消息
    @RequestMapping("/getXxdmk")
    public Map<String, Object> getXxdmk(String YHM,int YHSFDM) {
        return xxdmkService.getXxdmk(YHM,YHSFDM);
    }
    @PostMapping("/addXxdmk")
    public Map<String, Object> addXxdmk(Xxdmk xxdmk) {
        return xxdmkService.addXxdmk(xxdmk);
    }

    // 设置全部已读
    @RequestMapping("/setRead")
    public Map<String, Object> setRead(String YHM,int YHSFDM) {
        return xxdmkService.setRead(YHM,YHSFDM);
    }
}
